Platform Explorer / Nuxeo Platform 2021.25

Extension point diffBlock

Documentation

A diffBlock contribution defines which fields will be
displayed in the diff display block.
The order matters.

For complex types, items can be defined to specifiy which sub-fields must be displayed and in which order.

    <diffBlock label="label.diffBlock.dublincore" name="dublincore">
        <fields>
            <field name="description" schema="dublincore"/>
            <field name="coverage" schema="dublincore"/>
            <field name="created" schema="dublincore"/>
            <field name="modified" schema="dublincore"/>
        </fields>
    </diffBlock>
    <diffBlock label="label.diffBlock.files" name="files">
        <fields>
            <field displayContentDiffLinks="true" name="content" schema="file"/>
            <field name="files" schema="files">
                <items>
                    <!-- Display the file only, not the filename which is managed by the file widget type -->
                    <item displayContentDiffLinks="true" name="file"/>
                </items>
            </field>
        </fields>
    </diffBlock>

Contribution Descriptors

  • Class: org.nuxeo.ecm.diff.service.impl.DiffBlockDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-diff-jsf-2021.25.8.jar /OSGI-INF/diff-display-contrib.xml
    <extension point="diffBlock" target="org.nuxeo.ecm.diff.service.DiffDisplayService">
    
        <diffBlock name="dublincore">
          <properties mode="any">
            <property name="label">label.diffBlock.dublincore</property>
          </properties>
          <fields>
            <field name="description" schema="dublincore"/>
            <!-- Display the "dam_common" schema fields in case the DAM package
              is installed -->
            <field name="author" schema="dam_common"/>
            <field name="authoringDate" schema="dam_common"/>
            <field name="nature" schema="dublincore"/>
            <field name="subjects" schema="dublincore"/>
            <field name="rights" schema="dublincore"/>
            <field name="source" schema="dublincore"/>
            <field name="coverage" schema="dublincore"/>
            <field name="created" schema="dublincore"/>
            <field name="modified" schema="dublincore"/>
            <field name="format" schema="dublincore"/>
            <field name="language" schema="dublincore"/>
            <field name="expired" schema="dublincore"/>
            <field name="creator" schema="dublincore"/>
            <field name="contributors" schema="dublincore"/>
            <field name="lastContributor" schema="dublincore"/>
          </fields>
          <templates>
            <template mode="any">/layouts/layout_diff_template.xhtml
            </template>
          </templates>
        </diffBlock>
    
        <diffBlock name="files">
          <properties mode="any">
            <property name="label">label.diffBlock.files</property>
          </properties>
          <fields>
            <field displayContentDiffLinks="true" name="content" schema="file"/>
            <field name="files" schema="files">
              <items>
                <!-- Display the file only, not the filename which is managed
                  by the file widget type -->
                <item displayContentDiffLinks="true" name="file"/>
              </items>
            </field>
          </fields>
          <templates>
            <template mode="any">/layouts/layout_diff_template.xhtml
            </template>
          </templates>
        </diffBlock>
    
        <diffBlock name="note">
          <properties mode="any">
            <property name="label">label.diffBlock.note</property>
          </properties>
          <fields>
            <field displayContentDiffLinks="true" name="note" schema="note"/>
          </fields>
          <templates>
            <template mode="any">/layouts/layout_diff_template.xhtml
            </template>
          </templates>
        </diffBlock>
    
      </extension>